package com.zhuss.core.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.core.config.DetailConfigBo;
import com.zhuss.bean.bo.core.config.SearchConfigBo;
import com.zhuss.common.ReadService;
import com.zhuss.core.processor.ConfigRead;
import com.zhuss.exception.OceanException;


/**
 * 配置查询service（基本查询）
 * @author zhushanshuo
 * @Date 2020-02-20 11:58
 *
 */
@Component("configReadService")
public class ConfigReadService implements ReadService<Object, Object> {
	
	@Autowired
	@Qualifier("configRead")
	private ConfigRead configRead;
	
	/**
	 * 详情
	 */
	@Override
	public Object detail(Object param) throws OceanException {
		DetailConfigBo bo = (DetailConfigBo) param;
		Long configId = bo.getConfigId();
		Object vo = configRead.detail(configId);
		return vo;
	}
	
	/**
	 * 列表
	 */
	@Override
	public Object list(Object param) {
		SearchConfigBo bo = (SearchConfigBo) param;
		Object result = configRead.list(bo);
		return result;
	}
	
	
}

